package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TCalssMapper;
import com.ruoyi.system.domain.TCalss;
import com.ruoyi.system.service.ITCalssService;

/**
 * 班级Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-27
 */
@Service
public class TCalssServiceImpl implements ITCalssService 
{
    @Autowired
    private TCalssMapper tCalssMapper;

    /**
     * 查询班级
     * 
     * @param id 班级主键
     * @return 班级
     */
    @Override
    public TCalss selectTCalssById(Long id)
    {
        return tCalssMapper.selectTCalssById(id);
    }

    /**
     * 查询班级列表
     * 
     * @param tCalss 班级
     * @return 班级
     */
    @Override
    public List<TCalss> selectTCalssList(TCalss tCalss)
    {
        return tCalssMapper.selectTCalssList(tCalss);
    }

    /**
     * 新增班级
     * 
     * @param tCalss 班级
     * @return 结果
     */
    @Override
    public int insertTCalss(TCalss tCalss)
    {
        return tCalssMapper.insertTCalss(tCalss);
    }

    /**
     * 修改班级
     * 
     * @param tCalss 班级
     * @return 结果
     */
    @Override
    public int updateTCalss(TCalss tCalss)
    {
        return tCalssMapper.updateTCalss(tCalss);
    }

    /**
     * 批量删除班级
     * 
     * @param ids 需要删除的班级主键
     * @return 结果
     */
    @Override
    public int deleteTCalssByIds(Long[] ids)
    {
        return tCalssMapper.deleteTCalssByIds(ids);
    }

    /**
     * 删除班级信息
     * 
     * @param id 班级主键
     * @return 结果
     */
    @Override
    public int deleteTCalssById(Long id)
    {
        return tCalssMapper.deleteTCalssById(id);
    }

    @Override
    public List<TCalss> classByMajorId(Long majorId) {
        return tCalssMapper.classByMajorId(majorId);
    }
}
